<template>
    <div class="setting-box">
        <div class="setting-box-header">
          <span class="setting-box-title">{{ title }}</span> 
          <span v-if="rightTitle" class="setting-box-title">{{ rightTitle }}</span> 
        </div>
        <div class="setting-box-content">
            <slot />
        </div>
    </div>
</template>

<script lang="ts" setup>
defineOptions({
    name: 'SettingBox'
});

defineProps({
    title: {
        type: String,
        required: true
    },
    rightTitle: {
        type: String
    }
})
</script>

<style lang="scss" scoped>
.setting-box-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 0 10px;
   height: 30px;
   background-color: #f2f3f5; 
   border-bottom: 1px solid #dce0e5;
   border-top: 1px solid #dce0e5;
}

.setting-box-title {
    color: #666;
    font-size: 12px;
}

.setting-box-content {
    padding-top: 15px;
}
</style>